namespace FineCollection.Intf
{

    public interface WMap<K,V> : RMap<K,V>
        where K : System.IEquatable<K>
    {

        /// <summary>
        /// Associative indexator (modifyable).
        /// Allows to get and set <c>value</c> by the specified <c>key</c>.
        /// </summary>
        /// <param name="key">key.</param>
        /// <returns>found value, or <i>default</i> if not found.</returns>
        new V this[K key]
        {
            get;
            set;
        }


        /// <summary>
        /// Includes the specified association.
        /// If the same key is already exist in the map, this method 
        /// thows an exception.
        /// </summary>
        /// <param name="key">key.</param>
        /// <param name="value">value (associated object).</param>
        /// <exception cref="DuplicatesFoundException">throws when attempted to include 
        ///          an assiciation with a key that already exists in the map.</exception>
        void Include(K key, V value);
        

        /// <summary>
        /// Excludes the specified map entry from this map.
        /// <para>
        /// This method looks for the specified key, and if it exist, removes the found
        /// pair and returns the value that was associated with the specified key.
        /// </para>
        /// </summary>
        /// <param name="key">key to look for.</param>
        /// <returns>associated value, or <i>default(V)</i> if not found.</returns>
        V Exclude(K key);


        /// <summary>
        /// Drops all entries from the map.
        /// </summary>
        void Clear();
    }
    
    
}
